Skip to content

feat: add nub package manager support#3014

Open
2u841r wants to merge 1 commit into
npmx-dev:mainfrom
2u841r:feat/nub-package-manager
Open

feat: add nub package manager support#3014
2u841r wants to merge 1 commit into
npmx-dev:mainfrom
2u841r:feat/nub-package-manager

Conversation

@2u841r

@2u841r 2u841r commented Jul 6, 2026

Copy link
Copy Markdown

Summary

Icon

nub has no standalone logo file in its repo root, but the project's site repo (site/public/icon.svg in nubjs/nub) has one: a black rounded-square badge with a cream "n" glyph and an orange accent dot.

To match the existing icon set's aesthetic (vlt, a11y, etc. in assets/media/custom-icons.json), which are all flat, single-color glyphs that inherit currentColor so they follow the app's theme:

  • Dropped the background square and hardcoded colors (black bg, cream glyph, orange dot)
  • Kept just the "n" glyph + accent dot paths, recolored to fill='currentColor'
  • Cropped the viewBox from the original 0 0 32 32 down to a tight 5 4 23 23 around the glyph's actual bounding box — the original had padding built in for the (now-removed) background square, so without cropping the glyph rendered noticeably smaller than the other PM icons at the same h-3 w-3 size

Test plan

  • test:types passes
  • pnpm test passes (1693/1693 unit + component tests)
  • Verified nub option appears and works in the PM dropdown, install command box, and execute command box locally
  • Reviewer: confirm nub icon renders correctly and matches sizing of other PM icons

Adds nub (https://github.com/nubjs/nub) as a selectable package manager
across the install/execute command builders, the PM dropdown, and the
terminal install/execute displays.

Refs npmx-dev#3013
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jul 6, 2026 3:20pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jul 6, 2026 3:20pm
npmx-lunaria Ignored Ignored Jul 6, 2026 3:20pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92d854f2-0189-47f4-b042-fb9f9c1249cf

📥 Commits

Reviewing files that changed from the base of the PR and between 4f3c588 and d7e34eb.

📒 Files selected for processing (7)
  • app/components/Package/ManagerSelect.vue
  • app/components/Terminal/Execute.vue
  • app/components/Terminal/Install.vue
  • app/utils/install-command.ts
  • app/utils/prehydrate.ts
  • assets/media/custom-icons.json
  • test/unit/app/utils/install-command.spec.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for an additional package manager, including its install and execute commands.
    • The new package manager icon now appears in the interface when selected.
  • Bug Fixes

    • Improved package-manager selection handling so the new option is recognised from saved preferences and shared links.
    • Updated terminal command displays to show the correct command variant for the new package manager.

Walkthrough

This PR adds "nub" as a supported package manager. It introduces a packageManagers configuration entry, a custom icon asset, prehydration validation for the nub identifier, CSS selector updates across three Vue components to display nub-specific content, and new unit test cases covering install/execute command generation.

Changes

Nub Package Manager Support

Layer / File(s) Summary
Package manager configuration and icon
app/utils/install-command.ts, assets/media/custom-icons.json, app/utils/prehydrate.ts
Adds a nub entry to packageManagers with install/create/execute command metadata (expanding PackageManagerId), adds a nub SVG icon entry, and adds 'nub' to the validPMs set used for prehydration validation.
UI visibility selectors
app/components/Package/ManagerSelect.vue, app/components/Terminal/Execute.vue, app/components/Terminal/Install.vue
Extends data-pm-based CSS selectors so vp and nub command/content variants become visible when selected.
Unit test coverage for nub
test/unit/app/utils/install-command.spec.ts
Adds it.each test rows covering nub for getPackageSpecifier, getInstallCommand, and getExecuteCommandParts, including scoped/unscoped, versioned, dev-dependency, JSR-availability, and create-* scenarios.

Suggested reviewers: ghostdevv

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely states the main change: adding nub package manager support.
Description check ✅ Passed The description is directly related to the nub support changes and matches the implemented scope.
Linked Issues check ✅ Passed The changes implement nub support in command builders, selectors, prehydrate validation, icon assets, and tests as requested in #3013.
Out of Scope Changes check ✅ Passed No clearly out-of-scope changes are evident; the icon, UI, logic, and tests all support nub package manager integration.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/utils/prehydrate.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for nub package manager

1 participant